package com.atde._03_creational_design_patterns.fcatory.factorymethod.pizzastore.order;


import com.atde._03_creational_design_patterns.fcatory.factorymethod.pizzastore.pizza.LDCheesePizza;
import com.atde._03_creational_design_patterns.fcatory.factorymethod.pizzastore.pizza.LDPepperPizza;
import com.atde._03_creational_design_patterns.fcatory.factorymethod.pizzastore.pizza.Pizza;

/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._03_creational_design_patterns.fcatory.factorymethod.pizzastore.order
 * @Author: Del
 * @CreateTime: 2025-06-03  00:35
 * @Description: TODO
 * @Version: 1.0
 */
public class LDOrderPizza extends  OrderPizza{

    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")) {
            pizza = new LDCheesePizza();
        } else if (orderType.equals("pepper")){
            pizza = new LDPepperPizza();
        }
        return pizza;
    }
}
